reftests: Add a reftest for rendering failure
authorBenjamin Otte <otte@redhat.com>
Fri, 19 Apr 2019 00:28:37 +0000 (02:28 +0200)
committerBenjamin Otte <otte@redhat.com>
Fri, 19 Apr 2019 01:39:57 +0000 (03:39 +0200)
c18d2872f292607c921c959e6e97c4d6635bdfd2 introduced a misrendering in
the Cairo fallback rendering code while fixing another one.

This test exposes that problem.

Related: !756

testsuite/reftests/meson.build
testsuite/reftests/partial-rounded-border.css [new file with mode: 0644]
testsuite/reftests/partial-rounded-border.ref.ui [new file with mode: 0644]
testsuite/reftests/partial-rounded-border.ui [new file with mode: 0644]

index 998d76349d08e361fc7c78f08b6efc20765f22b9..9845b42e068f4c5648f4f1bcee4fe9722eae20e9 100644 (file)
@@ -325,6 +325,9 @@ testdata = [
   'paned-undersized.css',
   'paned-undersized.ref.ui',
   'paned-undersized.ui',
+  'partial-rounded-border.css',
+  'partial-rounded-border.ref.ui',
+  'partial-rounded-border.ui',
   'picture-load-invalid-file.ui',
   'picture-load-invalid-file.ref.ui',
   'pseudoclass-on-box.css',
diff --git a/testsuite/reftests/partial-rounded-border.css b/testsuite/reftests/partial-rounded-border.css
new file mode 100644 (file)
index 0000000..404f301
--- /dev/null
@@ -0,0 +1,40 @@
+* {
+  all: unset;
+}
+
+.background {
+  background-color: red;
+}
+
+button {
+  padding: 10px;
+}
+
+#topleft {
+  border-top-left-radius: 20px;
+  border-left: 5px solid blue;
+  border-top: 5px solid blue;
+}
+
+#topright {
+  border-top-right-radius: 20px;
+  border-right: 5px solid blue;
+  border-top: 5px solid blue;
+}
+
+#bottomleft {
+  border-bottom-left-radius: 20px;
+  border-left: 5px solid blue;
+  border-bottom: 5px solid blue;
+}
+
+#bottomright {
+  border-bottom-right-radius: 20px;
+  border-right: 5px solid blue;
+  border-bottom: 5px solid blue;
+}
+
+#reference {
+  border: 5px solid blue;
+  border-radius: 20px;
+}
diff --git a/testsuite/reftests/partial-rounded-border.ref.ui b/testsuite/reftests/partial-rounded-border.ref.ui
new file mode 100644 (file)
index 0000000..04bd817
--- /dev/null
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <object class="GtkWindow">
+    <property name="type">popup</property>
+    <child>
+      <object class="GtkGrid">
+        <property name="name">reference</property>
+        <child>
+          <object class="GtkButton">
+            <property name="label">topleft</property>
+            <layout>
+              <property name="left-attach">0</property>
+              <property name="top-attach">0</property>
+            </layout>
+          </object>
+        </child>
+        <child>
+          <object class="GtkButton">
+            <property name="label">topright</property>
+            <layout>
+              <property name="left-attach">1</property>
+              <property name="top-attach">0</property>
+            </layout>
+          </object>
+        </child>
+        <child>
+          <object class="GtkButton">
+            <property name="label">bottomleft</property>
+            <layout>
+              <property name="left-attach">0</property>
+              <property name="top-attach">1</property>
+            </layout>
+          </object>
+        </child>
+        <child>
+          <object class="GtkButton">
+            <property name="label">bottomright</property>
+            <layout>
+              <property name="left-attach">1</property>
+              <property name="top-attach">1</property>
+            </layout>
+          </object>
+        </child>
+      </object>
+    </child>
+  </object>
+</interface>
diff --git a/testsuite/reftests/partial-rounded-border.ui b/testsuite/reftests/partial-rounded-border.ui
new file mode 100644 (file)
index 0000000..c0d2724
--- /dev/null
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <object class="GtkWindow">
+    <property name="type">popup</property>
+    <child>
+      <object class="GtkGrid">
+        <child>
+          <object class="GtkButton">
+            <property name="label">topleft</property>
+            <property name="name">topleft</property>
+            <layout>
+              <property name="left-attach">0</property>
+              <property name="top-attach">0</property>
+            </layout>
+          </object>
+        </child>
+        <child>
+          <object class="GtkButton">
+            <property name="label">topright</property>
+            <property name="name">topright</property>
+            <layout>
+              <property name="left-attach">1</property>
+              <property name="top-attach">0</property>
+            </layout>
+          </object>
+        </child>
+        <child>
+          <object class="GtkButton">
+            <property name="label">bottomleft</property>
+            <property name="name">bottomleft</property>
+            <layout>
+              <property name="left-attach">0</property>
+              <property name="top-attach">1</property>
+            </layout>
+          </object>
+        </child>
+        <child>
+          <object class="GtkButton">
+            <property name="label">bottomright</property>
+            <property name="name">bottomright</property>
+            <layout>
+              <property name="left-attach">1</property>
+              <property name="top-attach">1</property>
+            </layout>
+          </object>
+        </child>
+      </object>
+    </child>
+  </object>
+</interface>